Skip to content

fix: [ejs] Upgrade ejs from 1.0.0 to 3.1.10 to resolve CVE-2022-29078 - #282

Open
hannahhuh-cog wants to merge 1 commit into
mainfrom
devin/1789373378-fix-ejs-rce-cve-2022-29078
Open

hannahhuh-cog wants to merge 1 commit into
mainfrom
devin/1789373378-fix-ejs-rce-cve-2022-29078

Conversation

@hannahhuh-cog

@hannahhuh-cog hannahhuh-cog commented Sep 14, 2026

Copy link
Copy Markdown

Summary

Bumps the direct dependency ejs 1.0.0 -> 3.1.10 (package.json + package-lock.json) to remediate the High (CVSS 9.8) server-side template injection / RCE vulnerability flagged by the scheduled Snyk SCA scan.

Vulnerability

  • Title: Remote Code Execution (RCE) via settings[view options][outputFunctionName]
  • CVE: CVE-2022-29078 · Snyk: SNYK-JS-EJS-2803307
  • Severity: High (CVSS 9.8, CWE-74)
  • Affected: ejs@1.0.0 (direct dependency)
  • Fixed in: 3.1.7; upgraded to 3.1.10, which also covers CVE-2017-1000228 (npm:ejs:20161128) in the same package.

Risk: attacker-controlled render options could inject arbitrary JavaScript executed on the server.

Compatibility note: app.js registers .ejs views through ejs-locals, which bundles its own nested ejs; the top-level ejs package is only reached via consolidate. Snyk's breakability check flags v1 -> v3 as a major API change (filters removed, include syntax changed), so if any .ejs template is later rendered with the top-level package, its include / filter syntax must be migrated.

Verification: require('ejs') resolves 3.1.10; app.js loads all modules without resolution errors (only expected MongoDB/MySQL connection failures).

Snyk scan reference: Snyk MCP SCA scan of COG-GTM/nodejs-goof on 2026-09-14 (org 9e26acce-22c7-4efc-b470-21d9587f49fe).

Devin-Org: engineering

Link to Devin session: https://app.devin.ai/sessions/387468bb0c6d4d6dbb7183fbbb24385f
Open in Devin Desktop: https://app.devin.ai/desktop/session/387468bb0c6d4d6dbb7183fbbb24385f?variant=devin
Requested by: @hannahhuh-cog


Devin Review

Co-Authored-By: Hannah Huh <hannah.huh@cognition.ai>
@devin-ai-integration

Copy link
Copy Markdown

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant